Fix listing of untracked files to not include tracked but modified ones
authorFelix Crux <felixc@felixcrux.com>
Sun, 10 Jan 2016 19:47:02 +0000 (14:47 -0500)
committerFelix Crux <felixc@felixcrux.com>
Tue, 12 Jan 2016 00:40:03 +0000 (19:40 -0500)
commite2cd4cdb52ecdefeae4b451d7316ac8f82606a3f
treee00e4439409b1eab1005c4ac2646bbe78850482d
parentfdfe8fc5dc536cf1a84207aaf7e75669f90e62e1
Fix listing of untracked files to not include tracked but modified ones

The logic in `sources/path.rs` that finds files that are untracked by the
version control system was incorrectly including files that *are* tracked,
but had been modified without the modification being committed to Git.

This manifested itself as strange duplications of files (e.g. in `cargo
package --list`), since they were listed once as tracked files, and once
more as allegedly "untracked" ones. It also caused failures when trying to
package the crate when files had been deleted, but the deletion was not
yet committed to Git.

Fixes #2199
src/cargo/sources/path.rs
tests/test_cargo_package.rs